package com.myrobot;

import java.awt.Point;
import java.util.Map;

import com.myrobot.ui.PointFrame;
import com.myrobot.ui.PointFrame.OnActionPointListener;
import com.myrobot.util.RobotUtil;

public class Sample {
	public static void main(String[] args)
	   {
//	     CaptureFrame frame = new CaptureFrame();
	     //MainWindow win = new MainWindow();
	     PointFrame pointFrame = new PointFrame(new String[]{"add_target"
//	    		 ,"browse","filename","open","width","add"
	    		 });
	     pointFrame.setActionPointListener(new OnActionPointListener() {
			
			@Override
			public void finish(Map<String, Point> actionPoints) {
				// TODO Auto-generated method stub
			     System.out.println(actionPoints);
			     String names[] = new String[] {"font000","font001","font002","font003","font004","font005"};
			     for(String name:names) {
				     RobotUtil.leftMouseClick(actionPoints.get("add_target"));
				     RobotUtil.delay(1000);
//				     RobotUtil.leftMouseClick(actionPoints.get("browse"));
//				     RobotUtil.delay(1000);
//				     RobotUtil.input(name + ".jpg");
//				     RobotUtil.delay(1000);
//				     RobotUtil.leftMouseClick(actionPoints.get("open"));
//				     RobotUtil.delay(1000);
//				     RobotUtil.leftMouseClick(actionPoints.get("width"));
//				     RobotUtil.delay(1000);
//				     RobotUtil.input("0.25");
//				     RobotUtil.delay(1000);
//				     RobotUtil.leftMouseClick(actionPoints.get("add"));
//				     RobotUtil.delay(8*1000);
			     }
			}
			
			@Override
			public void cancel() {
				// TODO Auto-generated method stub
				
			}
		});
	   }
}
